home *** CD-ROM | disk | FTP | other *** search
- ;
- ;$Module NXLSLIFC.386$
- ;
- ;Copyright 1989
- ;By NetFRAME Systems Inc.
- ; Sunnyvale, California U.S.A.
- ;
- ;$Author: Karl S. Johnson $
- ;$Date: 03 Apr 1990 10:46:14 $
- ;$Revision: 1.0 $
- ;
- ;$Description$
- ; C language interface for LSL assembler routines called by NX
- ;$EndDescription$
- ;
- ; Revision History
- ;$Log: H:/386/NLMS/DX/SRC/VCS/NXLSLIFC.386 $
- ;
- ; Rev 1.0 03 Apr 1990 10:46:14 Karl S. Johnson
- ; Initial revision.
- ;
- cproc macro procname
- local strname
-
- public procname
- strname:
- db '&procname&'
- db $ - strname
-
- procname proc near
- push ebp
- mov ebp, esp
- push esi
- push edi
- push ebx
- endm
-
-
- cendp macro procname
- pop ebx
- pop edi
- pop esi
- mov esp, ebp
- pop ebp
- ret
-
- procname endp
- endm
-
-
-
- CGROUP GROUP OSCODE
- DGROUP GROUP OSDATA
-
- assume cs: CGROUP, ds: DGROUP, es: DGROUP, ss: DGROUP
-
- OSDATA segment rw public 'DATA'
- OSDATA ends
-
- OSCODE segment er USE32 public 'CODE'
-
- extrn LSLRegisterPreScanStack: near
- extrn LSLDeRegisterPreScanStack: near
- extrn LSLReturnRcvECB: near
- extrn LSLGetRcvECB: near
-
- extrn NXReceiveCompletion: near
- extrn NXSendCompletion: near
-
- cproc CLSLRegisterPreScanStack
- ;
- ; int CLslRegisterMLID ( boardnumber, handlerproc, controlproc )
- ; void *handlerproc(), *controlproc();
- ; long boardnumber;
- ;
- mov ebx, 8[ebp] ; board number
- mov ecx, 12[ebp] ; ptr to handler proc
- mov edx, 16[ebp] ; ptr to control proc
- push ebp
- call LSLRegisterPreScanStack
-
- ; EAX contains return code
-
- pop ebp
-
- cendp CLSLRegisterPreScanStack
-
-
- cproc CLSLDeRegisterPreScanStack
-
- ; void CLSLDeregisterPreScanStack (boardnumber);
- ; long boardnumber;
-
- mov ebx, 8[ebp]
- push ebp
- call LSLDeRegisterPreScanStack
- pop ebp
- cendp CLSLDeRegisterPreScanStack
-
-
- cproc CLSLGetECB
-
- ; char *CLSLGetECB ();
-
- push ebp
- call LSLGetRcvECB
- or eax,eax
- jnz GetFailed
- mov eax,esi
- jmp SHORT GetReturn
- GetFailed:
- sub eax,eax
- GetReturn:
- pop ebp
-
- cendp CLSLGetECB
-
-
- cproc CLSLReturnECB
-
- ; void CLSLReturnECB (TheECB);
- ; char *TheECB;
-
- mov esi, 8[ebp]
- push ebp
- call LSLReturnRcvECB
- pop ebp
-
- cendp CLSLReturnECB
-
- cproc NXReceiveDone
-
- ; called by LSL as the prescan handler
- ; it calls NXReceiveCompletion( void *ECB )
-
- push esi
- call NXReceiveCompletion
- add esp, 4
-
- cendp NXReceiveDone
-
- cproc NXSendDone
-
- ; called by LSL as the send completion handler
- ; it calls NXSendCompletion( void *ECB )
-
- push esi
- call NXSendCompletion
- add esp, 4
-
- cendp NXSendDone
-
- cproc NXControl
-
- ; called by LSL as the prescan control
-
- mov eax, -1
- ret
-
- cendp NXControl
-
-
- OSCODE ends
-
-
- end
-